package com.rightsidetech.system.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Author: yhr
 * @Date: 2021-10-22 16:16
 */
@Data
public class CompanyAreaAddReq implements Serializable {
    @ApiModelProperty(value = "大区名称", required = true)
    @NotBlank(message = "大区名称不能为空")
    @Pattern(regexp = "^$|[\\s\\u4e00-\\u9fa5]{0,10}$", message = "大区名称请输入中文，不得超过10位")
    private String name;
    @ApiModelProperty(value = "负责人", required = true)
    @NotBlank(message = "负责人不能为空")
    @Length(max = 10,message = "负责人长度不合法")
    @Pattern(regexp = "^$|[\\u4e00-\\u9fa5]+", message = "负责人请输入中文")
    private String principalName;
    @ApiModelProperty(value = "手机号", required = true)
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[0-9]{10}$",message = "请输入正确的手机号")
    private String mobileNo;

}
